Updated and tested API