first stab at resource map... Still segfaults