remove obsolete code
add back some functions