incorporate danny's changes