added support for insert function with 2 variables