change to restful api