fixed np.append misuse, more tests