Finished assignment

Completed the functions.