update to make class dynamic