update to work with new swap in API