More exercise on class and loops