Why are snakes classified as reptiles?

They have all of the characteristics of a reptile such as scaly skin and laying eggs. Also they are cold blooded vertebrates that breath with lungs.