change variable name to block
finish resource map, add comments