added some testing logic