added refresh handler to self.update(), fix tests