add support for spawn