Added support for multiple insert types