put map in buf to use method with it