added impartation_intervals and lots of tests