code running twice - testing