working prm for small distances less than 6