first version of solution