implemented Peter's user account logic