refactor data sharing