wrote some karma unit tests, i do not know how it works... black magic