now fully supports medium trust