individual scenarios worked out using angularjs