minor changes; expanded tests