added to accomodate for ties