use first_tick and last_tick instead of ticks.first and ticks.last
Merge pull request #1 from cssum/max-instead-of-last

use first_tick and last_tick instead of ticks.first and ticks.last