Lab 1

Error checking added