make jshint happy
first attempt of block directive
made code more declarative