ironed out some bugs