I personally think it's cleaner than defining two one-off functions