added configuration and using rest call