extract methods in main of tag_preprocessing
decide to choose calculate_... as method names instead of calculation_of_...
refactor calculation of q but still error