basic logic skeleton