added range procedure
fixed kth procedure and added random sublist extraction