Lab 4 codes