This works but it is not fast