Assignment_3 v.1.0.1 refactored