adding version with bug fix for white spaces on array