fixed memory leak and crated a release project