tweaked syntax, added tests