added case statement and base class references