some variables assign to const
implements #7 and #8