updated tests and minor edits