Basic implementation of multilevelqueue with a bunch of if-else
statements