changed getUserInfo function