It was by/through writing stories that he managed to make some extra money. Which preposition is correct here?