optimization with const vars