improved helper class