added object + switch statement