Reformatted with out changing function