figured out how to convert IO to int/float and filled out calculation