set up guard for automatic testing