use same panic function everywhere