add functionality for reading sequence/checking for errors