refractor before block adding