New functions for API