ironed out a few bugs