moved functions of change profile to /lib

change profile still not implemented