add percol func for advanced cd func