trying to fix switch table issues