implement basic funtions