Phase 1 [65 points] done (everything except the extraction operator (>>) and the reduce function)