changes to allow Junit testing