added lastInsertId function support