Lab3 assignment (with errors)