Added truncate() and rand() function's