Updated files after debugging and testing in the lab