almost have qual c working. also switched to gc malloc