updated to 2 as per the homework