Replaced the protocols with blocks