added ability to specify swap frequency