Lab 5 code