added general program structure