minor adjustment to code layout
add supervisor helper function