cleaned getMiddlePos, toggleFormat in process
working on toggleFormat