adding prototype code, trying to get existing api to work