Added the stat and statm functions