first implementation and comments