added driver code, debugged model