partial solution for 1st task added