update to work with angular 1.0