added capability and input pattern for improving reusability