Added ATA read/write function