Added code for Alternative 2