bottle logic