grammer right but has memory leak