deleted narginchk to avoid warnings - was there to keep backward compatibility