Adding API plus structure functions