removed recursive function as it was shite