fixed paramter pos to the 'rest' function