javascript block is a bit of an optimization