added some other bits. hopefully nothing broken