added lastInsertId() function