added functionality for single function route definition