this will be significantly slower than the old version :)