updated to work with current server API