first draft of logic and interface complete