Some unsatisfying refactor