storing values into database