Added method for getting the last insert id.