slightly revised version from IJRR 13'