implemented basic functions and tested basics.