Modified codes to follow our web API