Added trailing zeroes logic.