resource code refactored
py3k fix for map to list conversion