what is basic principle of washing machine working