Code structure corrected -- accuarcy left