main function
sample template