some changes have done for database storing.