changed block implementation, added delegate implementation