added obj instead of this, for easier testing