put movefunc in separate file