adding valid method
making open a classmethod
adding documentation
moving files into io