New Implementation

1st part following the instructor's algorithm