basic logic completed