Implemented the first version.