rename function to arrayapi, elementfunction to api