worked on spawn controller