first implementation of assignment