Add GetFrom and SetTo func

These two funcs are mainly for testing purpose, but also may be used for high consistent.