port remain string func