fully working, but slow