implemented subscriber callback