extract calculate padding to method
extract caclulate text size to a method
final refactoring