refactored space update to outside