Changes to logic