adds bugs and fixes other bugs