it works, but it should be faster