added lots of bugs