added functionality for adding chains. starting calculation implementation now