Edited API function