kinda working

added functions..
todo: add doc, etc