final changes
fix block length bug again