Final version for Milestone 3