moved read file to utils
added some matrix functions