little progress, added most of the funcs
little progress, added most of the funcs