Use yield instead of passing block