improve metadata management
add selectAll method
fix select command