needed to write another function to calculate between