generate dummy controller resource
add another test
refactor, fix, and cleanup code