Added new not quite finished algorithm for working it out