changed this to self for correct context