add functions

changed functions name
add wholeTest