funtions implemented