added optional route variable passing