Some good code in scala