almost done missing a proper way to do IO