take note up to first and rest functions