seems a bit weird but I guess it works