complete basic function