implemented first version, with working example