adding some code to test why the code is behaving this way