BH R programming assignment 2