now it works properly