added callbacks to slide functions