code almost finished3