added parts of header file, private functions still missing