moved setup to before block