added parallel scala implementation for poks