make api pure