added low-level functions to class, fixes