got it actually working needs more test