added buffering for multiple arguments