still very buggy, but better than it was... (wow I'm terrible at commit messages at the moment)