initial work

initial work done, most of backend is taken care of, a few rules to take
work out and gui still left to do