added some ends