first implementation of needed classes