add quarterly calculation
refactor tests