rough implementation of 2.x api