Functions from the standard library. Recoded. Because my school wants me too :-)