huge improvements, fix #12