On the way to convert define in function.
First case is working!