Added method to insert units to db