finish first implementation