added subject model, modified controllers and views