refactored spec/requests and added guard