testing logic