port functions...