setting writable on end and readable on start