Changed to using an input argument instead of ivar