Ensure compliance

and improve efficiency