Might be copy & paste. I am happy to get a pull request to make this more compact.