small modified.
add restful support.