turn functions into class methods
add docstring to init method