updated comments re: added error checking