Checkpoint before removing const correctness
Add memory leak
first working version of mapping, code is terrible! will fix.