updated to use WebApi