remove unncessary blocks