Transfered exaple to main program