First version of  completed functions

2 functions are completed