functions 1-7, added 'self'