minor changes / optimization