correction of bad merge
add basic methods and some protocols