Sort of works still some bugs