updated with a few changes to tests