Works, but is too slow