Improvements to $n helper