extract a logic