capacity detection