sketching out some logic