added condition to view engine