updated user logic