update and delete obsolete code