before changing switch up to conditional
working code