optimize connections
fix test msg's; add test for read_query; impliment read_query