adding codes and sample inputs