fixed "text" method
add inheritStyle function
add total function