wrote draft of Model.java for MVC approach