add marker function
add helpers and comment for plan generation