added stability enhancements, clamped h, u, w