Don't remember why i did it like this, i will re-check if we can simplify ;)