Fixed error, added instance variables