refactor for reactadons and fix for labels