fix compile error and pass in a param