Recreated previous functionality using ivars instead