added before/after callbacks for draw/tick events