perform iterations in a background thread
refactor