final working version, working on adding training data