add reusable size() method