change to logic