Add function into corresponding route file as well