first version of minimal algorithm example