sample main function