Adds a helper function for components