return to root version with some improvements