Moving function outisde app