result in dead loop
make the code work