Changed test into blocks