fix: use app controlles instead global functions