adding sequence reading function and test