refactored inserts