All functions added

Not thoroughly tested