changes to logic