fix pointer stuff