added convnet and a small wrapper function