Used ternary for both $start and $lastPosition
Updated example + readme