adding composite pattern