fix compile error
some work done but not yet finished