test before begin