changed js API based on feeback