added support for automatic status codes