accept options hash, fixes #2