exporting public intf only from controller
reorder functions to be top-down