init with some functions, unfinished