added functionality for storing preferences of a user in database.pl