set name property and implement query method.
delete debug console.log
fix indent.