trying to calculate overall interest for a given period