make the first test pass, code is fucking dirty, refactoring needed