add controller & create 'open' function