Made changes to Implementation to make it work with example 4