Implementing random animation