aupport both block syntax and callbacks