Function code

The functions code was added and the descriptions where filled in