modified for deter testing