fix to logic here