additional options and checks in insert functions
Merge branch 'insert'