fixing error 

undefined 'self'