Removed factor out code