fixed all bugs from Jesse