added solution for Richards example