copying test stuff out of main JS