using MVC approach

separating classes int appropriate files