preliminary caffe wrapper