functions implement