it should be in before block