compacted data structure
fix constness
fix function name