added additional memory free