performance-related changes - hopefully a bit better