changed name of db entry from 'user_flag' to 'flags'