using method reference to get a simple code