middleman redo

full rework in middleman