works on mac and on ubuntu with delay