added pow and cap