initial working version of 2.x branch