Functional Algorithm again, after changes lost somewhere in git