remove uneccessary float conversion
extract months calculation into module