simplify path, application of stack