fix logic error try 3