changed the interface of spray implementation to allow remote access