Added calculations to do option 3 and 4