Need to change it cause python doesn't have tail recursion