Added useful functions.