creating REST controller