added more examples and optimized regression