added some functions for JSON web service