added more parantheses and it works, had to write it like a function