finally removed dirty pointer stuff