Original code as tested in stripboard version