fix 2 warnings
add restful code