refactory, unification, #29 and #31