Fixed ranger function