added a function to free enemies