fixed a lot of things (ex. self, threading)