updated to restful api