params tuned for speed,bugfix