uses sequence instead of flatten as of #50