completed find_mode