added read function for dref atom / added a support for reading atom from buf and separate function for reading atom ext from buf