Updated version
Added sorting by rep