valid(): Fix demo, using the correct valid method