implementing Task3