add nextTick() for adding classes