first version

just functions.  still so much bugs.