add addClass and removeClass function