Still needs testing but getting there