new smoother code