Subject chart working code