Updated to support parallel processing. Started the abandoned method