reduced usage of buffer variables