using element buffer