modified controller to save user id and have submitted state