added lowest_rank function for #370

Added function and example.