skeleton code for main logic