added the last function and moved them in the paces that they where suppose to go.