logic

set up the basic logic skeleton