it work but it code awful and make me wants another technique