use integer for service ranking
add support for run modes