update to logic