changed the storage from text file and integrated with mysql-database