changed the value part of the function

changed the value part of the function, added constant for allowable radius