created testing bed function