improved the push-pull example