works now, need to sort minor issues though