added sorting and country and removed null bug