add ordering functions