properly defining xml element handlers