Updated to use spawn