use std buffer sizes
removed dead code