possible scenario tested with angularjs