Revamped the read() completely