update code

some missing function now added