deleteing unuseful begin..end