added file2matrix function
small tweak
added new logic for dating example