animations work now
added method that adds class to a DOM element