adding assemble function