Ignore the part about unit-tests, I found that this just a move of an existing function.