added test, review fixes