added methods to user and tests