im not sure about this
seems to work fine but is the code good?
well at this point in time i didn't add tests. maybe i should do that