Possible solution, needs tested