implementation

fixed file read
mode implementation