added logging abilit back in. need to make it better