fixed proble with code

now it should work