Use a common function for each method.