complete most logic.

fyi.