added precision for s and d, also parameter index option