aesica your code is great, so your saying that i should make a separate class only for an enterframe function and collect them in one array for the enemies and the players functions. so what if i remove an object for example enemy then the enemy dies then how should i removed there functions individually if the loop is still running and the object would be null.