Works, but is really slow