some bugs in the previous additions ironed out