adding callbacks for better integration with event driven gui