model controller and structure implementation