some finetuning, implement begin and end via LAST_STEP and 1