homework08 that seems to work but needs to be tested before submittance.