correcting new logic