added finished callback hook