working on a less buged version