added error checking
h