Can we `return` here to reduce the depth of this function?