merged read and write controllers
we have one controller for both operations