main-logic testing