fix a little api bug
adjust construction and pass test