half baked restful api, need to implement the rest