refactor and make things constant