added powers code