Added gainpertime calculation