finished most of the user functions