optimised enemies and added a dead flag