code used for learning