adding Lab 4 Final code