added inverse relation to user history model and used in controller