added option for required attributes
added options for different implementation compatibility