store info into database