commented out algorithm