works in a very very slow and crude way