added possibility of custom priority