function adds a sprite and after a certain period of time removes it