extra credit2 implimented