Added functions (may need revision)

I'll compile this tomo and we can do more or maybe later