Used a helper set_an_ get function to avoid code duplication.