adds the necassary helper functions