handle app function consistently