using anonymous function concept