main logic for boat