use proper status code when resource created