updated the directive to use mg-class