cut out all unrelated declarations