modify SQL query for radius