not really happy with the code style but covering more, patterns will emerge