temp store was changed to accept buffer