implement targetAttribute configuration parameter, make configuration more robust and use defaults if possible