A framework for a cognitive theory of writing