Coding exercise for CFA