complete basic logic