removed n passing and fixed bug