using block-based API for observer