modified to apply gui mvc