removed ngDialog and use $modal instead