run callback after state updated