used const vars where possible