updated the implementation to reflect ivar changes