fix logic error try 2