parsing functions ready for testing