using angular.copy to dereference objects