formatting clean up
refactor immediate parameters handling