cleaned up readingParser funtion and wrote a determineBook function to clean code