implemented fade in/fade out animation