implemented a few changes suggested by stacy