implements mvc structure