added support for polymorphism in blocks
moved polymorphism of blocks to the view level