got first two fucntions for 3 done