added status codes and caching