basicaly done, minus tests