implement basic function.