simplified REST controller and added some logging