replaced map with special type
renamed variables
refactoring: bundled stuff in functions
changed flag description
changed description output