sometimes works sometimes doesnt work