Implemented the first version