logging tested but still need work.