working on main logic.
still a lot of work on definitions.