updated to work with new MC api (client lib v2.0)