start of testing logic