improved paper posting code