working for insertion in databse