changing function order