Add base for generating route algorithm