Add some program, fix a small bug for template