moved ata code to the struct init/destroy pattern