Add map method
Fix map operation
Add some util functions