add from_seq method