changed localtion of function