To enhance cp filter function & to refacktor style