insert in database now work properly