Implementation of simple router to be used instead of a lot of switch case's