added both types of key allocation support. up to routing