added the resize function to the profile view