chaning some ordering of functions