add missing method and bug fixes