add paraelle processing
add lock
comment out xpatch for console
Added xpatch to console