testing the logic