retort logic