Different Algorithm Attempt