seperate controller & data extract logic