refactor with const for unchangeble vars