add size function to core