fixed with help from posted solutions~