first implementation and documentation