a bit broken but mostly there