move safemap to utils & add many helpful slice function