added test, and changed helper class