now that this is a class you can use instance variables instead of globals