introduce const.go and correct some function's argument ordering