fixed compile errs
add test file