new calcSize and test functions have been added