added two functions rest and restful