Added lastInsertId response to insert function