execute onStart and onEnd functions if in target options