now with external JSON parameters, ready for webservices!