added bad hair day algorithm practice