minor edits and fix testing