finished demultiplex controller
updated indents