added close to free resources