Forgot to refactor this earlier