adds recursion to avoid server errors