implement functions. remove some comments
start working on class ptr