pull out xml -> list code as separate function