fixed a bug in my custom made truncate function. should accept any number as input and handle it appropriately now.