algorithm that didn't work just so we have it around