tiny code refactor