create and insert in db