use numpy array instead of list