fixed up pointer to pointer stuff