small update to logic