Added funtionality to read from file. Still not working although.