basic error checking added