base logic for Maybe