merged alex\'s and my stuff