done implementation of write(),close() and seek() functions