functions for guardian API