update reference
replace obsolate method
cleanup code