started to add some functionnal tests, it's quite messy right now but it's still better than nothing