remove duplication for helper class