played with some recursion