remove bytes package
add lock