implemented first version