Initially misunderstood a part of the task but its fixed now