applying the mvc pattern