add RESTful logic
SOme changes
add Rest