implemented width ranking