some acceleration support code but it seems a little buggy