add postfix and switch, error handling is not yet added