initialize swap in needed.