fleshing out logic