Pass required attributes parameter to function