fixed the 'self' problem and some other stuff!