comment some error checking