Added code for n=1