add perception code