more portable version