Realised that the elem argument was redundant -- it's closed over by the function -- and added a test for the signals