overhauled sqlmapping - create_resources