Back to 3. Using a single function for multiple actions