added documentatiion, prepended and appended inputs and more