refactor names, if conditions