Optimized for external paramaters