implemented basic functions