complete assignment

completed the functions