updates to logic