added conditionals for capabilties